<?php

namespace Atomic\Soup;

class Soup
{
  private $url;
  private $content;

  public function __construct($url)
  {
    $this->url = $url;
    $this->content = '';
  }

  public function fetchContent()
  {
    $this->content = file_get_contents($this->url);
    if ($this->content === false) {
      throw new \Exception("Could not fetch content from {$this->url}");
    }
  }

  public function getContent()
  {
    return $this->content;
  }
}
